package com.gopay.common.rcs.service.antiphish.check;

import java.awt.image.BufferedImage;

import com.gopay.common.constants.trans.GatewayChannel;
import com.gopay.common.domain.cust.CustCorpInfo;
import com.gopay.common.domain.rcs.req.RcsAntiPhishingRequest;
import com.gopay.common.domain.rcs.res.RcsAntiPhishingResponse;
import com.gopay.common.exception.GopayException;
import com.gopay.common.rcs.bean.VerifyCodeCheckStatus;

/**
 * 防钓鱼服务
 * 
 * @RcsAntiPhishingCheckService.java
 * @author liujy
 * @2013-7-23 下午6:34:35 www.gopay.com.cn Inc.All rights reserved.
 */
public interface RcsAntiPhishingCheckService {
    /** 反钓鱼商户域名列表的分隔符. */
    String DELIMITER_DOMAINNAME_LIST = ";";

    /**
     * 网关域名、时间戳、IP校验接口
     * 
     * @param request
     * @return
     */
    RcsAntiPhishingResponse rcsAntiPhishingCheck(RcsAntiPhishingRequest req) throws GopayException;

    /**
     * ip 白名单校验
     * @param req
     * @return
     * @throws GopayException
     */
    RcsAntiPhishingResponse rcsIPWhiteCheck(RcsAntiPhishingRequest req) throws GopayException;
    
    RcsAntiPhishingResponse doDomainnameCheck(RcsAntiPhishingRequest req) throws GopayException;

    RcsAntiPhishingResponse doDomainnameCheck(CustCorpInfo cust, RcsAntiPhishingRequest req) throws GopayException;

    RcsAntiPhishingResponse doTimestampCheck(RcsAntiPhishingRequest req) throws GopayException;

    RcsAntiPhishingResponse doTimestampCheck(CustCorpInfo cust, RcsAntiPhishingRequest req) throws GopayException;

    RcsAntiPhishingResponse doOrderIPCheck(RcsAntiPhishingRequest req) throws GopayException;

    RcsAntiPhishingResponse doOrderIPCheck(CustCorpInfo cust, RcsAntiPhishingRequest req) throws GopayException;

    /**
     * 收银台验证码输入接口
     * 
     * @param custId
     * @return
     */
    VerifyCodeCheckStatus verifyCodeConfig(String custId) throws GopayException;

    BufferedImage generateVerifyCodeImage(String randomStr, String merName, String tranAmt, String merReferUrl, String goodsInfo);

    BufferedImage getMerLogo(String custId, GatewayChannel gch);

    String getMerLogoUrl(String custId, GatewayChannel gch);
}
